/**
 * Created by fangshufeng on 2017/8/29.
 */

import React , {Component} from 'react';

import {
View,
    Text,
    TouchableOpacity
} from 'react-native'


class PropsClass extends Component {
        render (){
            return(
                <Text style={{
                    marginTop:100,
                    height:30,
                    backgroundColor:'#36e035',
                    alignItems:'center',
                    justifyContent:'center'}}>
                    Hello {this.props.name}!
                </Text>
             );
        }
}

function testFuc (e) {
    console.log(e);
}

export  default  class TestProps extends Component {
    render (){
            return (
            <TouchableOpacity onPress={()=>{
                testFuc('fafafa')
            }}>
                <View style={{backgroundColor: '#7ebcee',flex:1,flexDirection:'column'}}>
                    <PropsClass name='dasda'/>
                </View>
            </TouchableOpacity>
            );
    };
}